********************************************************************************
*************************** Replication Materials for **************************
***** Distrusting the Process: Electoral Trust, Operational Ideology, and ****** ***** Non-Voting Political Participation in the 2020 American Electorate *******
********************************************************************************

*Corresponds with the manuscript accepted for publication in Public Opinion Quarterly, Special Issue on Public Trust in Elections (2024) 

*Authors: Erin B. Fitz and Kyle L. Saunders

********************************************************************************

*All of the following variable transformations and analyses were conducted using Stata SE 17.0.

*All commands used for variable transformation and to generate tables/figures are commented out.

*Code for main analysis begins on line 908.

********************************************************************************

*To replicate this analysis, first download the corresponding Stata data file "Distrusting the Process ANES.dta"

*Original data and all corresponding documentation for the American National Election Studies (ANES) 2020 Time Series Study is also located at: https://electionstudies.org/data-center/2020-time-series-study/

*Next, install the following module used to create summated scale/indexed variables:
*ssc install sumscale
		
******************************** Demographics **********************************

*Sex
*gen sex = V201600
*replace sex = . if V201600 == -9
*replace sex = 0 if V201600 == 1
*replace sex = 1 if V201600 == 2
*label var sex ///
*"PRE: WHAT IS YOUR (R) SEX? [REVISED]"
*label define sex 0 "0 Male" 1 "1 Female"
*label values sex sex
*recast double sex

*Age
*gen agex = V201507x
*replace agex = . if V201507x == -9
*label var agex ///
*"PRE: SUMMARY: RESPONDENT AGE"
*label values agex agex
*recast double agex

*gen age = (agex-18)/62
*label var age ///
*"Recode (0-1) of agex"
*recast double age

*Education
*gen educationx = V201511x
*replace educationx = . if V201511x == -9
*replace educationx = . if V201511x == -8
*replace educationx = . if V201511x == -2
*label var educationx ///
*"PRE: SUMMARY: RESPONDENT 5 CATEGORY LEVEL OF EDUCATION"
*label define educationx ///
*1 "1 Less than high school" 2 "High school" 3 "3 Some college" 4 "4 Bachelor's degree" 5 "5 Graduate degree"
*label values educationx educationx
*recast double educationx

*gen education = educationx
*replace education = 0 if educationx == 1
*replace education = .25 if educationx == 2
*replace education = .5 if educationx == 3
*replace education = .75 if educationx == 4
*replace education = 1 if educationx == 5
*label var education ///
*"Recode (0-1) of educationx"
*recast double education

*Religiosity: Reverse coded from ANES 
*gen religiousx = V201433
*replace religiousx = . if V201433 == -9
*replace religiousx = . if V201433 == -8
*replace religiousx = 1 if V201433 == 5
*replace religiousx = 2 if V201433 == 4
*replace religiousx = 4 if V201433 == 2
*replace religiousx = 5 if V201433 == 1
*label var religiousx ///
*"PRE: IS RELIGION IMPORTANT PART OF R LIFE [REVISED]"
*label define religiousx /// 
*1 "1 Not important at all" 2 "2 A little important" 3 "3 Moderately important" 4 "4 Very important" 5 "5 Extremely important"
*label values religiousx religiousx
*recast double religiousx

*gen religious = religiousx
*replace religious = 0 if religiousx == 1
*replace religious = .25 if religiousx == 2
*replace religious = .5 if religiousx == 3
*replace religious = .75 if religiousx == 4
*replace religious = 1 if religiousx == 5
*label var religious ///
*"Recode (0-1) of religiousx"
*recast double religious 

*Race: White, non-Hispanic
*gen race = .
*replace race = 1 if V201549x == 1
*replace race = 0 if V201549x == 2
*replace race = 0 if V201549x == 3
*replace race = 0 if V201549x == 4
*replace race = 0 if V201549x == 5
*replace race = 0 if V201549x == 6
*label var race ///
*"Race: White, Non-Hispanic"
*label define race ///
*0 "0 Non-white" 1 "1 White"
*label values race race
*recast double race

*Ethnicity: Hispanic
*gen ethnicity = .
*replace ethnicity = 1 if V201549x == 3
*replace ethnicity = 0 if V201549x == 1
*replace ethnicity = 0 if V201549x == 2
*replace ethnicity = 0 if V201549x == 4
*replace ethnicity = 0 if V201549x == 5
*replace ethnicity = 0 if V201549x == 6
*label var ethnicity ///
*"Ethnicity: Hispanic"
*label define ethnicity ///
*0 "0 Non-hispanic" 1 "1 Hispanic"
*label values ethnicity ethnicity
*recast double ethnicity

*Income
*gen incomex = V202468x
*replace incomex = . if V202468x == -9
*replace incomex = . if V202468x == -5
*label var incomex ///
*"PRE-POST: SUMMARY: TOTAL (FAMILY) INCOME"
*label define incomex ///
*1 "<$9,999" 2 "$10,000-$14,999" 3 "$15,000-19,999" 4 "$20,000-24,999" 5  "$25,000-29,999" 6 "$30,000-34,999" 7 "$35,000-39,999" 8 "$40,000-44,999" 9 "$45,000-49,999" 10 "$50,000-59,999" 11 "$60,000-64,999" 12 "$65,000-69,999" 13 "$70,000-74,999" 14 "$75,000-79,999" 15 "$80,000-89,999" 16 "$90,000-99,999" 17 "$100,000-109,999" 18 "$110,000-124,999" 19 "$125,000-149,999" 20 "$150,000-174,999" 21 "$175,000-249,999" 22 "$250,000 or more"
*label values incomex incomex
*recast double incomex

*gen income = (incomex-1)/21
*label var income ///
*"Recode (0-1) of incomex"
*recast double income

*************************** Partisanship and Ideology **************************

*Ideology (7 pt. scale): "99. Haven't thought much about this" coded as 4
*gen ideologyx = V201200
*replace ideologyx = . if V201200 == -9
*replace ideologyx = . if V201200 == -8
*replace ideologyx = 4 if V201200 == 99
*label var ideologyx ///
*"PRE: 7PT SCALE LIBERAL-CONSERVATIVE SELF-PLACEMENT"
*label define ideologyx ///
*1 "1 Extremely liberal" 2 "2 Liberal" 3 "3 Slightly liberal" 4 "4 Moderate" 5 "5 Slightly conservative" 6 "6 Conservative" 7 "7 Extremely conservative"
*label values ideologyx ideologyx
*recast double ideologyx

*gen ideology = (ideologyx-1)/6
*label var ideology ///
*"Recode (0-1) of ideologyx"
*recast double ideology

*Ideological strength: "99. Haven't thought much about this" coded as 1
*gen ideostrengthx = V201200
*replace ideostrengthx = . if V201200 == -9
*replace ideostrengthx = . if V201200 == -8
*replace ideostrengthx = 4 if V201200 == 1
*replace ideostrengthx = 3 if V201200 == 2
*replace ideostrengthx = 2 if V201200 == 3
*replace ideostrengthx = 1 if V201200 == 4
*replace ideostrengthx = 2 if V201200 == 5
*replace ideostrengthx = 3 if V201200 == 6
*replace ideostrengthx = 4 if V201200 == 7
*replace ideostrengthx = 1 if V201200 == 99
*label var ideostrengthx ///
*"Ideological strength"
*label define ideostrengthx ///
*1 "1 Moderate" 2 "2 Slightly liberal/conservative" 3 "3 Liberal/conservative" 4 "4 Extremely liberal/conservative" 
*label values ideostrengthx ideostrengthx
*recast double ideostrengthx

*gen ideostrength = (ideostrengthx-1)/3
*label var ideostrength ///
*"Recode (0-1) of ideologystrengthx"
*recast double ideostrength

*Party ID (7 pt. scale) 
*gen pid7x = V201231x
*replace pid7x = . if V201231x == -9
*replace pid7x = . if V201231x == -8
*label var pid7x ///
*"PRE: SUMMARY: PARTY ID 7-PT"
*label define pid7x ///
*1 "1 Strong Democrat" 2 "2 Not very strong Democrat" 3 "3 Independent-Democrat" 4 "4 Independent" 5 "5 Independent-Republican" 6 "Not very strong Republican" 7 "7 Strong Republican"
*label values pid7x pid7x
*recast double pid7x

*gen pid7 = (pid7x-1)/6
*label var pid7 ///
*"Recode (0-1) pid7x"
*recast double pid7

*Party ID Strength
*gen pidstrengthx = V201231x
*replace pidstrengthx = . if V201231x == -9
*replace pidstrengthx = . if V201231x == -8
*replace pidstrengthx = 4 if V201231x == 1
*replace pidstrengthx = 3 if V201231x == 2
*replace pidstrengthx = 2 if V201231x == 3
*replace pidstrengthx = 1 if V201231x == 4
*replace pidstrengthx = 2 if V201231x == 5
*replace pidstrengthx = 3 if V201231x == 6
*replace pidstrengthx = 4 if V201231x == 7
*label var pidstrengthx ///
*"PID Strength"
*label define pidstrengthx ///
*1 "1 Independent" 2 "2 Lean" 3 "3 Not very strong" 4 "4 Strong"
*label values pidstrengthx pidstrengthx
*recast double pidstrengthx

*gen pidstrength = (pidstrengthx-1)/3
*label var pidstrength ///
*"Recode (0-1) of pidstrengthx"
*recast double pidstrength

**************************** Voting in 2020 Election ***************************

*Vote
*gen vote = V202068x
*replace vote = . if V202068x == -7
*replace vote = . if V202068x == -6
*replace vote = . if V202068x == -2
*replace vote = 0 if V202068x == 1
*replace vote = 1 if V202068x == 2
*label var vote ///
*"POST: SUMMARY: Post vote status for registered respondents"
*label define vote ///
*0 "0 No" 1 "1 Yes" 
*label values vote vote
*recast double vote

******************* Non-Voting Participation in 2020 Election ******************

*Attend: Online
*gen onlineattend = V202013
*replace onlineattend = . if V202013 == -7
*replace onlineattend = . if V202013 == -6
*replace onlineattend = 0 if V202013 == 2
*label var onlineattend ///
*"POST: R ATTEND ONLINE POLITICAL MEETINGS, RALLIES, SPEECHES, FUNDRAISERS"
*label define onlineattend ///
*0 "0 No" 1 "1 Yes"
*label values onlineattend onlineattend
*recast double onlineattend

*Attend
*gen attend = V202014
*replace attend = . if V202014 == -9
*replace attend = . if V202014 == -7
*replace attend = . if V202014 == -6
*replace attend = 0 if V202014 == 2
*label var attend ///
*"POST: R GO TO ANY POLITICAL MEETINGS, RALLIES, SPEECHES, DINNERS"
*label define attend ///
*0 "0 No" 1 "1 Yes"
*label values attend attend
*recast double attend

*Wear
*gen wear = V202015
*replace wear = . if V202015 == -9
*replace wear = . if V202015 == -7
*replace wear = . if V202015 == -6
*replace wear = 0 if V202015 == 2
*label var wear ///
*"POST: R WEAR CAMPAIGN BUTTON OR POST SIGN OR BUMPER STICKER"
*label define wear ///
*0 "0 No" 1 "1 Yes"
*label values wear wear
*recast double wear

*Work
*gen work = V202016
*replace work = . if V202016 == -7
*replace work = . if V202016 == -6
*replace work = 0 if V202016 == 2
*label var work ///
*"POST: R DO ANY (OTHER) WORK FOR PARTY OR CANDIDATE"
*label define work ///
*0 "0 No" 1 "1 Yes"
*label values work work
*recast double work

*Money: Candidate
*gen moneycand = V202017
*replace moneycand = . if V202017 == -7
*replace moneycand = . if V202017 == -6
*replace moneycand = 0 if V202017 == 2
*label var moneycand ///
*"POST: R CONTRIBUTE MONEY TO INDIVIDUAL CANDIDATE RUNNING FOR PUBLIC OFFICE"
*label define moneycand ///
*0 "0 No" 1 "1 Yes"
*label values moneycand moneycand
*recast double moneycand

*Money: Party
*gen moneyparty = V202019
*replace moneyparty = . if V202019 == -9
*replace moneyparty = . if V202019 == -8
*replace moneyparty = . if V202019 == -7
*replace moneyparty = . if V202019 == -6
*replace moneyparty = 0 if V202019 == 2
*label var moneyparty ///
*"POST: R CONTRIBUTE MONEY TO POLITICAL PARTY DURING THIS ELECTION YEAR"
*label define moneyparty ///
*0 "0 No" 1 "1 Yes"
*label values moneyparty moneyparty
*recast double moneyparty

*Money: Group
*gen moneyoth = V202021
*replace moneyoth = . if V202021 == -9
*replace moneyoth = . if V202021 == -8
*replace moneyoth = . if V202021 == -7
*replace moneyoth = . if V202021 == -6
*replace moneyoth = 0 if V202021 == 2
*label var moneyoth ///
*"POST: R CONTRIBUTE TO ANY OTHER GROUP THAT SUPPORTED OR OPPOSED CANDIDATES"
*label define moneyoth ///
*0 "0 No" 1 "1 Yes"
*label values moneyoth moneyoth
*recast double moneyoth

*Protest
*gen protest = V202025
*replace protest = . if V202025 == -9
*replace protest = . if V202025 == -7
*replace protest = . if V202025 == -6
*replace protest = 0 if V202025 == 2
*label var protest ///
*"POST: HAS R IN PAST 12 MONTHS: JOINED A PROTEST MARCH, RALLY, OR DEMONSTRATION"
*label define protest ///
*0 "0 No" 1 "1 Yes"
*label values protest protest
*recast double protest

*Petition
*gen petition = V202026
*replace petition = . if V202026 == -9
*replace petition = . if V202026 == -7
*replace petition = . if V202026 == -6
*replace petition = 0 if V202026 == 2
*label var petition ///
*"POST: HAS R IN PAST 12 MONTHS: SIGN INTERNET OR PAPER PETITION"
*label define petition ///
*0 "0 No" 1 "1 Yes"
*label values petition petition
*recast double petition

*Comment
*gen comment = V202029
*replace comment = . if V202029 == -9
*replace comment = . if V202029 == -8
*replace comment = . if V202029 == -7
*replace comment = . if V202029 == -6
*replace comment = 0 if V202029 == 2
*label var comment ///
*"POST: HAS R IN PAST 12 MONTHS: POSTED COMMENT ONLINE ABOUT POLITICAL ISSUE"
*label define comment ///
*0 "0 No" 1 "1 Yes"
*label values comment comment
*recast double comment

*Contact
*gen contact = V202030
*replace contact = . if V202030 == -9
*replace contact = . if V202030 == -8
*replace contact = . if V202030 == -7
*replace contact = . if V202030 == -6
*replace contact = 0 if V202030 == 2
*label var contact ///
*"POST: HAS R IN PAST 12 MONTHS: CONTACTED MEMBER OF US SENATE OR HOUSE OF REP"
*label define contact ///
*0 "0 No" 1 "1 Yes"
*label values contact contact
*recast double contact

*Talk
*gen talk = V202009
*replace talk = . if V202009 == -9
*replace talk = . if V202009 == -7
*replace talk = . if V202009 == -6
*replace talk = 0 if V202009 == 2
*label var talk ///
*"POST: R talk to anyone about voting for or against a party or candidate"
*label define talk ///
*0 "0 No" 1 "1 Yes"
*label values talk talk
*recast double talk

*12-Item NVP
*sumscale, f1(onlineattend attend wear work moneycand moneyparty moneyoth protest petition comment contact talk) fdummy
*rename Factor1_dsum nvpx
*label var nvpx ///
*"NVP (12) Index" 
*recast double nvpx

*gen nvp = (nvpx)/12
*label var nvp ///
*"Recode (0-1) nvpx"
*recast double nvp

*Six-Item NVP
*sumscale, f1(attend wear work moneycand moneyparty talk) fdummy
*rename Factor1_dsum nvp6x
*label var nvp6x ///
*"NVP (5/6) Index" 
*recast double nvp6x

*gen nvp6 = (nvp6x)/6
*label var nvp6 ///
*"Recode (0-1) nvp6x"
*recast double nvp6

*Any NVP activity 
*gen anynvp = nvpx 
*replace anynvp = 1 if nvpx == 1 
*replace anynvp = 1 if nvpx == 2
*replace anynvp = 1 if nvpx == 3
*replace anynvp = 1 if nvpx == 4
*replace anynvp = 1 if nvpx == 5
*replace anynvp = 1 if nvpx == 6
*replace anynvp = 1 if nvpx == 7
*replace anynvp = 1 if nvpx == 8
*replace anynvp = 1 if nvpx == 9
*replace anynvp = 1 if nvpx == 10
*replace anynvp = 1 if nvpx == 11
*replace anynvp = 1 if nvpx == 12
*label var anynvp ///
*"Any NVP Activity"
*recast double anynvp 

*Seven-Item NVP 
*sumscale, f1(attend wear work moneycand moneyparty talk comment) fdummy
*rename Factor1_dsum nvp7x 

*gen nvp7 = (nvp7x)/7
*label var nvp7 ///
*"Seven-Item NVP"
*recast double nvp7

********************************* Recruitment **********************************

*Party Contact: Combined measures of split sample questions V202004 and V202005
*gen party = .
*replace party = 1 if V202004 == 1
*replace party = 1 if V202005 == 1
*replace party = 0 if V202004 == 2
*replace party = 0 if V202005 == 2
*label var party ///
*"POST: Did party contact R about 2020 campaign"
*label define party ///
*0 "0 No" 1 "1 Yes"
*label values party party
*recast double party

*Support
*gen support = V202007
*replace support = . if V202007 == -9
*replace support = . if V202007 == -8
*replace support = . if V202007 == -7
*replace support = . if V202007 == -6
*recode support (2=0)
*label var support ///
*"POST: Someone not from two major parties contact R about supporting candidates"
*label define support ///
*0 "0 No" 1 "1 Yes"
*label values support support
*recast double support

*Register
*gen register = V202008
*replace register = . if V202008 == -8
*replace register = . if V202008 == -7
*replace register = . if V202008 == -6
*recode register (2=0)
*label var register ///
*"POST: Anyone talk to R about registering or getting out to vote"
*label define register ///
*0 "0 No" 1 "1 Yes"
*label values register register
*recast double register

*Recruitment Index 
*sumscale, f1(party support register) fdummy
*rename Factor1_dsum recruitx
*label var recruitx ///
*"Recruitment Index"
*recast double recruitx

*gen recruit = (recruitx)/3
*label var recruit ///
*"Recode (0-1) recruitx"
*recast double recruit 

************************************* Trump ************************************

*House Decision: 0.5 = neither favor nor oppose
*gen houseimpeach = V201384 
*replace houseimpeach = . if V201384 == -9
*replace houseimpeach = . if V201384 == -8
*recode houseimpeach (1=0) (3=.5) (2=1)
*label var houseimpeach ///
*"PRE: SUMMARY: FAVOR OR OPPOSE HOUSE IMPEACHMENT DECISION"
*label define houseimpeach ///
*0 "0 Favor" 1 "1 Oppose"
*label values houseimpeach houseimpeach
*recast double houseimpeach 

*Senate Decision: 0.5 = neither favor nor oppose. Reverse coded from ANES. 
*gen senateacquittal = V201387
*replace senateacquittal = . if V201387 == -9
*replace senateacquittal = . if V201387 == -8
*recode senateacquittal (3=.5) (2=0)
*label var senateacquittal ///
*"PRE: SUMMARY: FAVOR OR OPPOSE SENATE ACQUITTAL DECISION"
*label define senateacquittal ///
*0 "0 Oppose" 1 "1 Favor"
*label values senateacquittal senateacquittal
*recast double senateacquittal 

*COVID-19
*gen prescovid = V201142
*replace prescovid = . if V201142 == -9
*replace prescovid = . if V201142 == -8
*recode prescovid (2=0) 
*label var prescovid ///
*"Pre: Approve/disapprove President handling COVID-19"
*label define prescovid ///
*0 "0 Disapprove" 1 "1 Approve"
*label values prescovid prescovid
*recast double prescovid

*Trump Scale 
*sumscale, f1(houseimpeach senateacquittal prescovid)
*rename Factor1_average trump 
*label var trump ///
*"2020 Trump Scale"
*recast double trump

*********************************** Abortion ***********************************

*Reverse coded from ANES 
*gen abortionx = V201342x 
*replace abortionx = . if V201342x == -2
*recode abortionx (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
*label var abortionx ///
*"Pre: SUMMARY: Abortion rights Supreme Court"
*label define abortionx ///
*1 "Extremely upset" 2 "2 Moderately upset" 3 "3 A little upset" 4 "4 Neither pleased nor upset" 5 "5 A little pleased" 6 "6 Moderately pleased" 7 "7 Extremely pleased"
*label values abortionx abortionx 
*recast double abortionx 

*gen abortion = (abortionx-1)/6
*label var abortion ///
*"Recode (0-1) abortionx"
*recast double abortion 

*********************************** COVID-19 ***********************************

*Reverse coded from ANES 
*gen fedcovidx = V201392x
*replace fedcovidx = . if V201392x == -2
*recode fedcovidx (1=5) (2=4) (4=2) (5=1) 
*label var fedcovidx ///
*"Pre: SUMMARY: Federal government response to COVID-19" 
*label define fedcovidx ///
*1 "1 Much too slow" 2 "2 Somewhat too slow" 3 "3 About right" 4 "4 Somewhat too quick" 5 "5 Much too quick" 
*label values fedcovidx fedcovidx 
*recast double fedcovidx 

*gen fedcovid = (fedcovidx-1)/4
*label var fedcovid ///
*"Recode (0-1) fedcovidx"
*recast double fedcovid 

************************************ Finances **********************************

*Finances
*gen financesx = V201503
*replace financesx = . if V201503 == -9
*replace financesx = . if V201503 == -8
*label var financesx ///
*"PRE: R how much better or worse off financially next year"
*label define financesx ///
*1 "1 Much better off" 2 "2 Somewhat better off" 3 "3 About the same" 4 "4 Somewhat worse off" 5 "5 Much worse off"
*label values financesx financesx
*recast double financesx

*gen finances = (financesx-1)/4
*label var finances ///
*"Recode (0-1) financesx"
*recast double finances

********************************* Issues ***************************************

*Government Assistance: "99 Haven't thought much about this" coded as 4
*gen govassistx = V201258
*replace govassistx = . if V201258 == -9
*replace govassistx = . if V201258 == -8
*replace govassistx = 4 if V201258 == 99
*label var govassistx ///
*"PRE: 7pt scale gov assistance to blacks scale: self-placement"
*label define govassistx ///
*1 "1 Government should help blacks" 7 "7 Blacks should help themselves"
*label values govassistx govassistx
*recast double govassistx

*gen govassist = (govassistx-1)/6
*label var govassist ///
*"Recode (0-1) govassistx"
*recast double govassist

*Gov/Private Medical: "99. Haven't thought much about this" coded as 4
*gen privatemedx = V201252
*replace privatemedx = . if V201252 == -9
*replace privatemedx = . if V201252 == -8
*replace privatemedx = 4 if V201252 == 99
*label var privatemedx ///
*"PRE: 7pt scale gov-private medical insurance scale: self-placement"
*label define privatemedx ///
*1 "1 Government insurance plan" 7 "7 Private insurance plan"
*label values privatemedx privatemedx
*recast double privatemedx

*gen privatemed = (privatemedx-1)/6
*label var privatemed ///
*"Recode (0-1) privatemedx"
*recast double privatemed

*Job-Income: "99. Haven't thought much about this" coded as 4
*gen jobincomex = V201255
*replace jobincomex = . if V201255 == -9
*replace jobincomex = . if V201255 == -8
*replace jobincomex = 4 if V201255 == 99
*label var jobincomex ///
*"PRE: 7pt scale guaranteed job-income scale: self-placement"
*label define jobincomex ///
*1 "1 Government should see to jobs and standards of living" 7 "7 Government should let each person get ahead on their own"
*label values jobincomex jobincomex
*recast double jobincomex

*gen jobincome = (jobincomex-1)/6
*label var jobincome ///
*"Recode (0-1) jobincomex"
*recast double jobincome

*Services: Reverse coded. "99. Haven't thought much about this" coded as 4
*gen servicesx = V201246
*replace servicesx = . if V201246 == -9
*replace servicesx = . if V201246 == -8
*replace servicesx = 4 if V201246 == 99
*recode servicesx (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1)
*label var servicesx ///
*"PRE: 7pt scale spending & services: self-placement"
*label define servicesx ///
*1 "1 Government should provide many more services" 7 "7 Government should provide many fewer services"
*label values servicesx servicesx
*recast double servicesx

*gen services = (servicesx-1)/6
*label var services ///
*"Recode (0-1) servicesx"
*recast double services

*Tradeoff: "99 Haven't thought much about this" coded as 4
*gen tradeoffx = V201262
*replace tradeoffx = . if V201262 == -9
*replace tradeoffx = . if V201262 == -8
*replace tradeoffx = 4 if V201262 == 99
*label var tradeoffx ///
*"PRE: 7pt scale environment-business tradeoff"
*label define tradeoffx ///
*1 "1 Tougher regulations on business needed to protect environment" 7 "7 Regulations to protect environment already too much of a burden on business"
*label values tradeoffx tradeoffx
*recast double tradeoffx

*gen tradeoff = (tradeoffx-1)/6
*label var tradeoff ///
*"Recode (0-1) tradeoffx"
*recast double tradeoff

*Wall: Reverse coded
*gen wallx = V201426x
*replace wallx = . if V201426x == -2
*recode wallx (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1)
*label var wallx ///
*"PRE: SUMMARY: Favor or oppose building a wall on border with Mexico"
*label define wallx ///
*1 "1 Oppose a great deal" 2 "2 Oppose a moderate amount" 3 "3 Oppose a little" 4 "4 Neither favor nor oppose" 5 "5 Favor a little" 6 "6 Favor a moderate amount" 7 "7 Favor a great deal"
*label values wallx wallx
*recast double wallx

*gen wall = (wallx-1)/6
*label var wall ///
*"Recode (0-1) wallx"
*recast double wall

*Defense: "99 Haven't thought much about this" coded as 4
*gen defensex = V201249
*replace defensex = . if V201249 == -9
*replace defensex = . if V201249 == -8
*replace defensex = 4 if V201249 == 99
*label var defensex ///
*"PRE: 7pt scale defense spending: self-placement"
*label define defensex ///
*1 "1 Greatly decrease defense spending" 7 "7 Greatly increase defense spending"
*label values defensex defensex 
*recast double defensex 

*gen defense = (defensex-1)/6
*label var defense ///
*"Recode (0-1) defensex: PRE: 7pt scale defense spending: self-placement"
*recast double defense

*Issues Scale
*sumscale, f1(govassistx privatemedx jobincomex servicesx tradeoffx wallx defensex)
*rename Factor1_average issuesx
*label var issuesx ///
*"Issue Preferences"
*recast double issuesx

*sumscale, f1(govassist privatemed jobincome services tradeoff wall defense)
*rename Factor1_average issues
*label var issues ///
*"Recode (0-1): Issue Preferences"
*recast double issues

*Binned Issues scale 
*egen issuescat=cut(issuesx), group(3) 
*label var issuescat ///
*"Binned Issues Scale"
*recast double issuescat 

******************************** Trust in Govt *********************************

*Reverse coded from ANES
*gen trustx = V201233
*replace trustx = . if V201233 == -9
*replace trustx = . if V201233 == -8
*recode trustx (1=5) (2=4) (3=3) (4=2) (5=1)
*label var trustx ///
*"PRE: How often trust government in Washington to do what is right [revised]"
*label define trustx ///
*1 "1 Never" 2 "2 Some of the time" 3 "3 About half the time" 4 "4 Most of the time" 5 "5 Always"
*label values trustx trustx
*recast double trustx

*gen trust = (trustx-1)/4
*label var trust ///
*"Recode (0-1) trustx"
*recast double trust

********************************** Interest ************************************

*Interest: Reverse coded
*gen interestx = V201006
*replace interestx = . if V201006 == -9
*recode interestx (1=3) (3=1) 
*label var interestx ///
*"PRE: How interested in following campaigns" 
*label define interestx ///
*1 "1 Not much interested" 2 "2 Somewhat interested" 3 "3 Very much interested" 
*label values interestx interestx
*recast double interestx

*gen interest = (interestx-1)/2
*label var interest ///
*"Recode (0-1) interestx"
*recast double interest

********************************** Efficacy ************************************

*Officials
*gen officialsx = V202212 
*replace officialsx = . if V202212 == -9
*replace officialsx = . if V202212 == -7
*replace officialsx = . if V202212 == -6
*replace officialsx = . if V202212 == -5
*replace officialsx = . if V202212 == -4
*label var officialsx ///
*"POST [STD] Public officials don't care what people think"
*label define officialxs ///
*1 "1 Agree strongly" 2 "2 Agree somewhat" 3 "3 Neither agree nor disagree" 4 "4 Disagree somewhat" 5 "5 Disagree strongly" 
*label values officialsx officialsx
*recast double officialsx

*gen officials = (officialsx-1)/4
*label var officials ///
*"Recode (0-1) officialsx"
*recast double officials 

*No Say
*gen nosayx = V202213
*replace nosayx = . if V202213 == -9
*replace nosayx = . if V202213 == -7
*replace nosayx = . if V202213 == -6
*replace nosayx = . if V202213 == -5
*label var nosayx ///
*"POST [STD] Have no say about what government does"
*label define nosayx ///
*1 "1 Agree strongly" 2 "2 Agree somewhat" 3 "3 Neither agree nor disagree" 4 "4 Disagree somewhat" 5 "5 Disagree strongly" 
*label values nosayx nosayx
*recast double nosayx

*gen nosay = (nosayx-1)/4
*label var nosay ///
*"Recode (0-1) nosayx"
*recast double nosay 

*Efficacy
*sumscale, f1(officialsx nosayx)
*rename Factor1_average efficacyx 
*recast double efficacyx

*gen efficacy = (efficacyx-1)/4
*label var efficacy ///
*"Recode (0-1) efficacyx" 
*recast double efficacyx 

************************************ Anger *************************************

*gen angerx = V201118
*replace angerx = . if V201118 == -9
*replace angerx = . if V201118 == -8
*label var angerx ///
*"PRE: How angry R feels about how things are going in the country"
*label define angerx ///
*1 "1 Not at all" 2 "2 A little" 3 "3 Somewhat" 4 "4 Very" 5 "5 Extremely"
*label values angerx angerx
*recast double angerx

*gen anger = (angerx-1)/4
*label var anger ///
*"Recode (0-1) angerx"
*recast double anger

******************************* Trust Elections ********************************

*gen trustofficialsx = V201352
*replace trustofficialsx = . if V201352 == -9
*replace trustofficialsx = . if V201352 == -8
*label var trustofficialsx ///
*"PRE: Trust election officials"
*label define trustofficialsx ///
*1 "1 Not at all" 2 "2 A little" 3 "3 A moderate amount" 4 "4 A lot" 5 "5 A great deal"
*label values trustofficialsx trustofficialsx
*recast double trustofficialsx 

*gen trustofficials = (trustofficialsx-1)/4
*label var trustofficials ///
*"Recode trustofficialsx 0-1"
*recast double trustofficials 

*gen votecountx = V201351 
*replace votecountx = . if V201351 == -9
*replace votecountx = . if V201351 == -8
*label var votecountx ///
*"PRE: Votes counted accurately"
*label define votecountx ///
*1 "1 Not at all" 2 "2 A little" 3 "3 Moderately" 4 "4 Very" 5 "5 Completely"
*label values votecountx votecountx 
*recast double votecountx 

*gen votecount = (votecount-1)/4
*label var votecount ///
*"Recode 0-1 votecountx" 
*recast double votecount 

*alpha votecount trustofficials, item

*Electoral Trust 
*sumscale, f1(votecount trustofficials)
*rename Factor1_average trustelection
*label var trustelection ///
*"Electoral Trust"
*recast double trustelection 

********************************* Trust People *********************************

*Reverse coded from ANES
*gen trustpeoplex =  V201237
*replace trustpeoplex = . if V201237 == -9
*replace trustpeoplex = . if V201237 == -8
*recode trustpeoplex (1=5) (2=4) (4=2) (5=1)
*label var trustpeoplex ///
*"PRE: How often can people be trusted"
*label define trustpeoplex ///
*1 "1 Never" 2 "2 Some of the time" 3 "3 About half the time" 4 "4 Most of the time" 5 "5 Always"
*label values trustpeoplex trustpeoplex 
*recast double trustpeoplex 

*gen trustpeople = (trustpeoplex-1)/4
*label var trustpeople ///
*"Recode 0-1 trustpeoplex" 
*recast double trustpeople 

********************************************************************************
******************************** Main Analysis *********************************
********************************************************************************

*Set ANES survey weights
svyset [pweight=V200010b], strata(V200010d) psu(V200010c)

************************************ Table 1 ***********************************

*Proportion of NVP items
tab talk
tab comment 
tab petition 
tab moneycand 
tab wear
tab contact 
tab onlineattend
tab moneyparty 
tab protest 
tab moneyoth 
tab attend
tab work 

tab anynvp 
summarize anynvp 

*Item/Factor Analysis for NVP
factor onlineattend attend wear work moneycand moneyparty moneyoth protest petition comment contact talk, ipf

alpha onlineattend attend wear work moneycand moneyparty moneyoth protest petition comment contact talk, item

*Item/Factor Analysis for all trust measures 
factor trust trustpeople votecount trustofficials, ipf

alpha trust trustpeople votecount trustofficials, item

*Item/Factor Analysis for measures in Electoral Trust
factor votecount trustofficials, ipf

alpha votecount trustofficials, item

*Item/Factor Analysis for Issues
factor govassist privatemed jobincome services tradeoff wall defense, ipf 

alpha govassist privatemed jobincome services tradeoff wall defense, item

************************************ Table 2 ***********************************

svy: poisson nvp issues trustelection trustpeople trust pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustT2, excel replace dec(2) sideway noaster

svy: poisson nvp c.trustelection##c.issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustT2, excel append dec(2) sideway noaster

************************************ Figure 2 **********************************

*Figure 1
svy: poisson nvpx trust trustpeople trustelection issuesx pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 

margins, at(issuesx=(1(.25)7))

*marginsplot, ytitle("NVP") xtitle("Issue Preferences") x(issuesx) recast(line) xlabel(1(1)7)
*graph save distrustF2A.gph

svy: poisson nvpx trust trustpeople trustelection issues pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 

margins, at(trustelection=(0(.125)1)) 

*marginsplot, ytitle("NVP") xtitle("Trust in Election") x(trustelection) recast(line) xlabel(0 .5 1)
*graph save distrustF2B.gph

*graph combine distrustF2A.gph distrustF2B.gph, ycommon
*graph save distrustF2

************************************ Figure 3 **********************************

svy: poisson nvpx c.trustelection##c.issuescat trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 

margins, dydx(trustelection) at(issuescat=(0 1 2))

margins, at(trustelection=(0(.125)1) issuescat=(0 1 2))

*marginsplot, ytitle("NVP") xtitle("Trust in the Election") x(trustelection) recast(line) xlabel(0 .5 1)
*graph save distrustF3

********************************************************************************
**************************** Supplementary Material ****************************
********************************************************************************

************ SM1: Robustness Checks with Alternative Measures of NVP *********** 

*Item/Factor Analysis for Six-Item NVP
factor attend wear work moneycand moneyparty talk, ipf

alpha attend wear work moneycand moneyparty talk, item

*Table SM1.1
svy: poisson nvp6 trustelection issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM11, excel append dec(2) sideway noaster

svy: poisson nvp6 c.trustelection##c.issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM11, excel append dec(2) sideway noaster

*Table SM1.2 
pwcorr onlineattend attend wear work moneycand moneyparty moneyoth protest petition comment contact talk anynvp, star(.05) obs

*Table SM1.3
svy: poisson nvp7 trust trustpeople trustelection issues pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM13, excel append dec(2) sideway noaster

svy: poisson nvp7 c.trustelection##c.issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM13, excel append dec(2) sideway noaster

****************** SM2: Individual Measures in Electoral Trust *****************

*Model 1
svy: poisson nvp issues trustofficials trustpeople trust pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM2, excel replace dec(2) sideway noaster

*Model 2
svy: poisson nvp c.trustofficials##c.issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM2, excel replace dec(2) sideway noaster

*Model 3
svy: poisson nvp issues votecount trustpeople trust pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM2, excel replace dec(2) sideway noaster

*Model 4
svy: poisson nvp c.votecount##c.issues trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM2, excel replace dec(2) sideway noaster

**************************** SM4: Summary Statistics ***************************

summarize nvpx pidstrengthx ideostrengthx issuesx educationx incomex religiousx agex sex race ethnicity recruitx interestx efficacyx trustelection trustpeoplex trustx angerx financesx

******************** SM5: NVP in 2020 (with Binned Issues) *********************

svy: poisson nvp trustelection issuescat trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances
*outreg2 using distrustSM5, excel replace dec(2) sideway noaster

svy: poisson nvp c.trustelection##c.issuescat trust trustpeople ideostrength interest pidstrength education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM5, excel replace dec(2) sideway noaster

*************************** SM6: Other 2020 Issues *****************************

svy: poisson nvp trust trustpeople trustelection trump pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM6, excel replace dec(2) sideway noaster

svy: poisson nvp trust trustpeople trustelection abortion pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM6, excel replace dec(2) sideway noaster

svy: poisson nvp trust trustpeople trustelection fedcovid pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM6, excel replace dec(2) sideway noaster

svy: poisson nvp trust trustpeople c.trustelection##c.trump pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
outreg2 using distrustSM6, excel replace dec(2) sideway noaster

svy: poisson nvp trust trustpeople c.trustelection##c.abortion pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM6, excel replace dec(2) sideway noaster

svy: poisson nvp trust trustpeople c.trustelection##c.fedcovid pidstrength ideostrength interest education income religious age sex race ethnicity recruit efficacy anger finances 
*outreg2 using distrustSM6, excel replace dec(2) sideway noaster

********************************************************************************
